<template>
    <div class="footer">
        <div class="foots"></div>
        <div class="foot">
            <div class="footBox" :class="{'spanColor':num==index}" v-for="(v,index) in footArr" :key="index" @click="toPage(index)">
                <img :src="v.img" alt="">
                <span>{{ v.msg }}</span>
            </div>
        </div>
    </div>
</template>

<script>

export default {
    data(){
        return{
            footArr:[
                { img:"https://gw.alicdn.com/tfs/TB1gNPEYVT7gK0jSZFpXXaTkpXa-132-132.png",msg:"小黑盒"},
                { img: "https://gw.alicdn.com/imgextra/i1/O1CN01i7ql04207MhSO5pb7_!!6000000006802-2-tps-132-132.png", msg: "尖货抽签" },
                { img: "https://gw.alicdn.com/tfs/TB1TnHFYYr1gK0jSZFDXXb9yVXa-132-132.png", msg: "明星种草" },
                { img: "https://gw.alicdn.com/tfs/TB1HbH9oGNj0u4jSZFyXXXgMVXa-132-132.png", msg: "新品适用" },
            ],
            num:0
        }
    },
    methods:{
        toPage(index){
            this.num=index
        }
    }
}
</script>

<style scoped>

.foots{
    width: 100%;
    height: 67px;
}
.foot{
    width: 100%;
    height: 47px;
    display: flex;
    position: fixed;
    z-index: 1000;
    background: #fff;
    bottom: 0;
 }
 .foot .footBox{
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
 }
  .foot .footBox img{
    width: 22px;
    height: 22px;
  }
  .spanColor{
    color: #967E4F;
  }
</style>